#include <stdio.h>
#include <math.h>

int main()
{
    long height, n;
    scanf("%ld %ld", &height, &n);
    if (n == 0)
    {
        printf("0.0 0.0");
    }
    else
    {
        double x = 1.0 * height;
        for (double i = 1.0; i < n; i++)
        {
            x += 2 * height / pow(2.0, i);
        }
        double FanTan = height / pow(2.0, 1.0 * n);
        printf("%.1f %.1f", x, FanTan);
    }

    return 0;
}